package com.hydra.core.pojo;

import java.io.Serializable;
import java.util.Set;

/**
 * @author:hydra
 * @version 创建时间：2017年11月5日 下午4:47:08 
 * 类说明:模块实体类
 */
public class Module implements Serializable {
	private Long id;// 主键.
	private String name;// 名称.
	private String resourceType;// 资源类型，[menu|button]
	private String url;// 资源路径.
	private String permission; // 权限字符串,menu例子：role:*，button例子：role:create,role:update,role:delete,role:view
	private Long parentId; // 父编号
	private Set<Role> roles;
	private Boolean available = Boolean.FALSE;

	public String getResourceType() {
		return resourceType;
	}

	@Override
	public String toString() {
		return "Module [id=" + id + ", name=" + name + ", resourceType=" + resourceType + ", url=" + url
				+ ", permission=" + permission + ", parentId=" + parentId + ", roles=" + roles + ", available="
				+ available + "]";
	}

	public void setResourceType(String resourceType) {
		this.resourceType = resourceType;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Boolean getAvailable() {
		return available;
	}

	public void setAvailable(Boolean available) {
		this.available = available;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Role> getRoles() {
		return roles;
	}

	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}
}
